﻿<%@ Page Language="C#" MasterPageFile="../main.master" Inherits="VioletDevelopmentLaboratory.Net.Web.Configuration.VWebConfigManagerPage" %>

<script runat="server">
	protected void TraceDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);
	}
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPlaceHolder" Runat="Server">

	<h2>Trace</h2>

	<div>
		<asp:ObjectDataSource ID="TraceDetailsViewDataSource" runat="server" 
			SelectMethod="GetTrace" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.TraceSectionManager" 
			UpdateMethod="Modify">
			<UpdateParameters>
				<asp:Parameter Name="enabled" Type="Boolean" />
				<asp:Parameter Name="localOnly" Type="Boolean" />
				<asp:Parameter Name="mostRecent" Type="Boolean" />
				<asp:Parameter Name="pageOutput" Type="Boolean" />
				<asp:Parameter Name="requestLimit" Type="Int32" />
				<asp:Parameter Name="traceMode" Type="Object" />
				<asp:Parameter Name="writeToDiagnosticsTrace" Type="Boolean" />
			</UpdateParameters>
		</asp:ObjectDataSource>
		<fieldset>
			<asp:DetailsView ID="TraceDetailsView" runat="server" AutoGenerateRows="False" 
				DataSourceID="TraceDetailsViewDataSource" DefaultMode="Edit" 
				onitemupdated="TraceDetailsView_ItemUpdated" CellPadding="5">
				<Fields>
					<asp:CheckBoxField DataField="Enabled" HeaderText="Enabled" 
						SortExpression="Enabled" />
					<asp:CheckBoxField DataField="LocalOnly" HeaderText="LocalOnly" 
						SortExpression="LocalOnly" />
					<asp:CheckBoxField DataField="MostRecent" HeaderText="MostRecent" 
						SortExpression="MostRecent" />
					<asp:CheckBoxField DataField="PageOutput" HeaderText="PageOutput" 
						SortExpression="PageOutput" />
					<asp:BoundField DataField="RequestLimit" HeaderText="RequestLimit" 
						SortExpression="RequestLimit" />
					<asp:TemplateField HeaderText="TraceMode" SortExpression="TraceMode">
						<EditItemTemplate>
							<asp:DropDownList ID="TraceModeDropDownList" runat="server" 
								SelectedValue='<%# Bind("TraceMode") %>'>
								<asp:ListItem>SortByCategory</asp:ListItem>
								<asp:ListItem>SortByTime</asp:ListItem>
							</asp:DropDownList>
						</EditItemTemplate>
					</asp:TemplateField>
					<asp:CheckBoxField DataField="WriteToDiagnosticsTrace" 
						HeaderText="WriteToDiagnosticsTrace" SortExpression="WriteToDiagnosticsTrace" />
					<asp:CommandField ShowEditButton="True" ButtonType="Button" 
						ShowCancelButton="False" />
				</Fields>
			</asp:DetailsView>
		</fieldset>
	</div>
</asp:Content>